import os

os.environ['TRANSFORMERS_OFFLINE']="0"
os.environ['1DIFFUSERS_OFFLINE']="0"
os.environ['HF_HUB_OFFLINE']="0"


__dir__ = os.path.dirname(os.path.abspath(__file__))
local_dir = os.path.abspath(os.path.join(__dir__, 'models'))
cache_dir = os.path.abspath(os.path.join(__dir__, 'models'))


repo_id = "DeepFloyd/IF-I-XL-v1.0"
# repo_id = 'stabilityai/stable-diffusion-2-1-base'
from huggingface_hub import snapshot_download
snapshot_download(repo_id=repo_id,local_dir=local_dir,cache_dir = cache_dir,max_workers=1)